<script setup>
import { onMounted,ref } from 'vue';
const list =ref([])

onMounted(async() => {
    const res =await fetch('https://mock.mengxuegu.com/mock/66585c4db462b81cb3916d3e/songer/songer')
    const data =await res.json()
    console.log(data);
    list.value = data.data
})
const handleClick = (item) => {
    console.log(item);
    list.value = list.value.filter((cur)=>cur.name!==item.name)
}
</script>

<template>
    <div>
        <ul>
            <li v-for="(item,index) in list" :key="'index'" @click="handleClick(item)">{{item.name}}</li>
        </ul>
    </div>
</template>

<style lang="css" scoped>

</style>